/**
 *
 * @author dell
 * @createDate 2015年6月29日
 */
package temp.casia.isiteam.zrb.hbase.client.util;

import javax.annotation.PostConstruct;

import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;

/**
 * 配置信息
 * @author 彭鑫
 * @createDate 2015年6月29日
 */
public class ConfigUtil {
	private static String quorum;
	private static Logger logger = Logger.getLogger(ConfigUtil.class);
	
	/*static{
		Properties proper = new Properties();
		try {
			proper.load(new FileInputStream(System.getProperty("zhaorongbao.config_path")+"/hbase.properties"));
			quorum = proper.getProperty("hbase.zookeeper.quorum");
			if(StringUtils.isNotBlank(quorum)){
				Commons.quorum = quorum;
			}
		} catch (Exception e) {
			logger.error("",e);
		} 
		
	}
	*/
	
	@PostConstruct
	void init(){
		if(StringUtils.isNotBlank(quorum)){
			Commons.quorum = quorum;
		}
	}
	public static void setQuorum(String quorum) {
		ConfigUtil.quorum = quorum;
	}
	/**
	 * @return the quorum
	 */
	public static String getQuorum() {
		return quorum;
	}

	
}
